package com.bz.xtcx.manager.enums;

/**
 * @author zhangkj
 *
 */
public enum UserTypeEnum {

	/**
	 * 1
	 */
	Expert(1, "expertUser", "ZJ"),
	/**
	 * 2
	 */
	Enterprise(2, "enterpriseUser", "QY"),
	/**
	 * 3
	 */
	Service(3, "serviceUser", "FWJG"),
	/**
	 * 4
	 */
	College(4, "collegeUser", "GXYS"),
	/**
	 * 5
	 */
	Military(5, "militaryUser", "MILITARY"),
	/**
	 * 6
	 */
	Results(6,"results", "CG"),
	/**
	 * 7
	 */
	Requirement(7,"requirement", "XQ"),
	/**
	 * 9
	 */
	Other(9,"other","OTHER");
	
	private final int key;

    private final String theName;
    
    private final String theCode;
    
    public int key() {
        return this.key;
    }

    public String theName() {
        return this.theName;
    }
    
    public String theCode() {
        return this.theCode;
    }
    
	UserTypeEnum(int key, String theName, String theCode) {
        this.key = key;
        this.theName = theName;
        this.theCode = theCode;
    }
	
	public static String getTheCode(int key) {
		switch(key) {
			case 1 :
				return UserTypeEnum.Expert.theCode;
			case 2 :
				return UserTypeEnum.Enterprise.theCode;
			case 3 :
				return UserTypeEnum.Service.theCode;
			case 4 :
				return UserTypeEnum.College.theCode;
			case 5 :
				return UserTypeEnum.Military.theCode;
			case 6 :
				return UserTypeEnum.Results.theCode;
			case 7 :
				return UserTypeEnum.Requirement.theCode;
		}
		return UserTypeEnum.Other.theCode;
	}
	
	public static void main(String[] args) {
		System.out.println(UserTypeEnum.Expert.theName);
	}
}
